<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>会员登录-花礼网</title>
    <meta name="description"
          content="鲜花网,选中国鲜花礼品网(花礼网)-中国鲜花网领先品牌,Hua.com专注鲜花速递服务10年,销量稳居鲜花礼品类网站首位！鲜花网提供24小时订鲜花，同城送花、异地送花服务,网上订花后最快3小时即可将鲜花快递上门,送花网站覆盖中国900多城市！"/>
    <meta name="keywords" content="中国鲜花礼品网,鲜花,鲜花网,鲜花快递,网上订花送花,中国鲜花网,鲜花礼品,网上订花,送花网站"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="renderer" content="webkit|ie-comp">
    <link rel="icon" href="/favicon.ico" mce_href="/favicon.ico" type="image/x-icon">
    <link rel="stylesheet" href="../css/layer.css" type="text/css"/>
    <link rel="stylesheet" href="../css/common.css" type="text/css"/>
    <link rel="stylesheet" href="../css/public_2020.css" type="text/css"/>
    <link rel="stylesheet" href="../css/pc_login_20191023.css" type="text/css"/>
    <!--公共js-->
    <script src="../../../Common/js/jquery-3.5.1.min.js"></script>
    <script src="../../../Common/layui/layui.js"></script>
    <script src="../../../Common/js/jquery.form.js"></script>
    <script src="../../../Common/js/common.js"></script>
    <!--js-->
    <script src="../js/common.js"></script>
    <!--购物车待完善-->
    <script type="text/javascript" src="../js/statesandright.js"></script>
    <script type="text/javascript" src="../js/mailautocomplete.js"></script>
    <script type="text/javascript" src="../js/gt.js"></script>
    <script type="text/javascript" src="../js/verifyMethodSwitch.js"></script>
    <script type="text/javascript" src="../js/pc_Login_CommonV2.js"></script>
    <!--登录js-->
    <script src="../js/login.js"></script>
    <!--[if lte IE 9]>
    <style>
        .pwd-input {
            display: none;
        }
    </script>
    <![endif]-->
    <style>
        body {
            color: #737373;
        }
    </style>
    <!--[if lt IE 9]>
    <script src="//img02.hua.com/pc/assets/js/html5shiv.min.js"></script>
    <![endif]-->
</head>
<body class="home">

<!-- 顶部导航 -->
<div class="site-nav">
    <div class="container">
        <ul class="site-nav-l">
            <li class="menu">
                <a href="https://www.hua.com/" onclick="addfavorite();return false;"><span class="ico ico-star"></span>收藏鲜花网(hua.com)</a>
            </li>
            <li class="menu dropdown">
                <a href="javascript:void(0)" data-hover="dropdown" data-delay="0"><span class="ico ico-weixin"></span>关注微信</a>
                <div class="dropdown-menu dropdown-weixin">
                    <img src="../images/wxguanjia_qrcode.png" height="124" width="124">
                    <p>扫码关注<br>回复"礼物" 更多惊喜！</p>
                </div>
            </li>
            <li class="menu dropdown">
                <a href="/mobile/" data-hover="dropdown" data-delay="0" target="_blank"><span
                        class="ico ico-mobile"></span>花礼网app</a>
                <div class="dropdown-menu dropdown-weixin">
                    <img src="../images/app_download_qrcode.png" height="124" width="124">
                    <p>新人专享100元APP礼包</p>
                </div>
            </li>
        </ul>
        <ul class="site-nav-r">
            <!--登陆状态信息显示start-->
            <li class="menu login" id="LoginInfo">
                <a href="/Passport/Login/" rel="nofollow" id="btn-login">你好，请登录</a><a href="/Passport/Register/"
                                                                                      rel="nofollow" id="btn-reg">注册</a>
            </li>
            <!--登陆状态信息显示end-->
            <li class="site-nav-pipe">|</li>
            <li class="menu">
                <a href="/help/ordercx/" rel="nofollow" target="_blank">订单查询</a>
            </li>
            <li class="site-nav-pipe">|</li>
            <!--我的花礼信息显示start-->
            <li class="menu dropdown">
                <a href="/member/" rel="nofollow" data-hover="dropdown" data-delay="0" target="_blank">我的花礼</a>
            </li><!--我的花礼信息显示end-->
            <li class="site-nav-pipe">|</li>
            <li class="menu dropdown">
                <a href="/help/" data-hover="dropdown" data-delay="0" target="_blank">客户服务<span
                        class="glyphicon glyphicon-triangle-bottom"></span></a>
                <div class="dropdown-menu dropdown-service">
                    <a href="/member/payment/balancefill" target="_blank">在线付款</a>
                    <a href="/help/" target="_blank">帮助中心</a>
                    <a href="/help/afterservice.htm" target="_blank">售后服务</a>
                    <a href="/help/sendRange.htm" target="_blank">配送范围</a>
                    <a href="/chat/" target="_blank">留言反馈</a>
                </div>
            </li>
            <li class="site-nav-pipe">|</li>
            <!--购物车信息显示start-->
            <li class="menu dropdown">
                <a href="/shopping/showcart/" data-hover="dropdown" data-delay="0" rel="nofollow" target="_blank"><span
                        class="ico ico-cart"></span>购物车<span class="text-primary" id="gwcCount"></span><span
                        class="glyphicon glyphicon-triangle-bottom"></span></a>
                <div class="dropdown-menu dropdown-cart" id="CartInfo"></div>
            </li><!--购物车信息显示end-->
            <li class="site-nav-pipe">|</li>
            <li class="menu slogan">
                中国鲜花礼品网:中国鲜花网领先品牌
            </li>
        </ul>
    </div>
</div>
<!-- 顶部导航 End -->
<!-- 头部 -->
<header>
    <div class="logo">
        <h1><a href="/" class="logo-bd">中国鲜花礼品网(花礼网)</a></h1>
        <!--
<div class="delivery-city">
<div class="dropdown csqh">
    欢迎登录
</div>
</div>
-->
    </div>
    <div class="search">
        <form name="i_search" method="get" action="/search/">
            <div class="input-group">
                <input name="keyword" type="text" class="form-control" placeholder="商品关键词">
                <span class="input-group-btn">
                    <button id="test" class="btn btn-primary" type="button"
                            onClick="this.form.submit()">搜索</button>
                </span>
            </div>
        </form>

    </div>
    <div class="service serviceDefault">
        <span class="ico ico-phone"></span>400-889-8188
        <a class="header-chat" href="javascript:void(0);"><span class="ico ico-headset"></span>在线客服</a>
    </div>
    <div class="service serviceVip">
        <div class="vipwechatchat">
            <img style="margin-right: 6px;" src="../images/wechat.png"
                 width="30"/><span>1对1钻石客户经理</span>
            <div class="vipwechatchat-box">
                <h3>微信1对1客服经理</h3>
                <img class="img-responsive" style="width: 120px;display: inline-block;"
                     src="../images/VIPChatQR.jpg"/>
                <p>扫一扫添加客户经理微信</p>
                <p>微信号：VIP-Service-Hua</p>
            </div>
        </div>
        <a class="header-chat" href="javascript:void(0);"><span class="ico ico-headset"></span>在线客服</a><br/>
        <span class="ico ico-phone"></span><span>钻石专线：400-830-3920</span>
    </div>
</header>
<!-- 头部 End -->
<section class="login-wrapper">
    <div class="container">
        <div class="login-box">
            <ul class="login-tabs">
                <li class="login-account">账号登录</li>
                <li class="login-wx">微博扫码登录
                    <img class="wxqr" src="../images/pc_login_qr.png" alt=""/></li>
            </ul>
            <!-- 账号登录 -->
            <div id="form1">
                <div class="login-form login-form-box" style="display:block;">
                    <p class="login-form-box-toggle">
                        <a class="toggle-opt" href="javascript:;" style="display:block;"><i
                                class="mini-icon icon-message"></i>手机验证码登录</a>
                        <a class="toggle-apt" href="javascript:;" style="display:none;"><i
                                class="mini-icon icon-unlocked"></i>账号密码登录</a>
                    </p>
                    <!-- 手机快捷登录 -->
                    <div class="login-form-phone" style="display:none;">
                        <div class="tel-box">
                            <div class="input-box">
                                <span class="icon icon-iphone"></span>
                                <input id="UserPhone" name="UserPhone" class="account" type="text" placeholder="请输入手机号">
                            </div>
                            <p class="tips"></p>
                        </div>
                        <div id="verifyBox2" class="verify-box verify-box2">
                            <div class="input-box">
                                <input id="phonePicCode" name="phonePicCode" class="verify" type="text"
                                       autocomplete="off" placeholder="请输入图形验证码">
                                <a href="javascript:RefreshImage2('imgCaptcha2');">
                                    <img id="imgCaptcha2" src="../js/index">
                                </a>
                            </div>
                            <p class="tips"></p>
                        </div>
                        <div class="code-box">
                            <div class="input-box">
                                <span class="icon icon-message"></span>
                                <input id="phoneSmsCode" name="phoneSmsCode" class="pwd" type="text"
                                       placeholder="请输入短信验证码" autocomplete="off">
                                <button id="getcodeBtn" class="get-code" href="#">获取验证码</button>
                                <div id="prompt_info" style="display:none;"><span id="regetcode">90</span>秒后重新发送</div>
                            </div>
                            <p class="tips"></p>
                        </div>
                        <input class="form-btn login-btn" type="button" onClick="CheckPhoneLogin();" value="登录">
                        <p class="form-tip"><i class="mini-icon icon-info"></i>若是首次登录请先注册</p>
                    </div>

                    <!-- 账号密码登录 -->
                    <div class="login-form-pwd" style="display:block;">
                        <div class="account-box">
                            <div class="input-box">
                                <span class="icon icon-iphone"></span>
                                <input id="UserName" name="UserName" class="account" type="text"
                                       placeholder="请输入手机号">
                            </div>
                            <p class="tips"></p>
                        </div>
                        <div class="pwd-box">
                            <div class="input-box">
                                <span class="icon icon-unlocked"></span>
                                <!--[if lte IE 9]>
                                <div class="cover-pwd" data-placeholder="请输入密码">请输入密码</div>
                                <input id="PassWord" name="PassWord" class="pwd" type="password">
                                <![endif]-->
                                <input id="PassWord" name="PassWord" class="pwd pwd-input" type="password"
                                       placeholder="请输入密码">
                            </div>
                            <p class="tips"></p>
                        </div>
                        <div id="verifyBox1" class="verify-box verify-box1">
                            <div class="input-box">
                                <input id="ValidCode" name="ValidCode" class="verify" type="text" autocomplete="off"
                                       placeholder="请输入验证码">
                                <a href="javascript:RefreshImage('imgCaptcha1');">
                                    <img id="imgCaptcha1" src="../js/index">
                                </a>
                            </div>
                            <p class="tips"></p>
                        </div>
                        <input class="form-btn login-btn" type="button"
                               id="dosubmit" value="登录">
                        <div class="form-tip">
                            <a class="pwd-forget" href="/Member/Password/Forgot">忘记密码？</a>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 微信扫码登录 -->
            <div class="login-form login-form-wx" style="display:none;">
                <div id="QrCodeBox" class="qrcode-box">
                    <div class="qrcode-img">
                        <img src="../js/tempqrpic"
                             alt="微信扫码" draggable="false"/>
                        <i class="layer-bt"></i><i class="layer-bb"></i><i class="layer-bl"></i><i class="layer-br"></i>
                    </div>
                    <div class="qrcode-text">微博扫码 快速登录
                        <!--<i class="mini-icon icon-question"></i>
                        <p class="pop-tips">关注花礼网微信公众号登录</p>-->
                    </div>
                </div>
            </div>

            <div class="bottom-box">
                <ul class="other-login-ways">
                    //QQ登录
                    <li class="login-way login-qq">
                        <a href="javascript:void(0)" onclick="third_Login('qq')">
                            <i class="icon icon-QQ"></i>
                            <span>QQ</span>
                        </a>
                    </li>
                    //支付宝
                    <li class="login-way login-ali">
                        <a href="javascript:void(0)" onclick="third_Login('alipay')">
                            <i class="icon icon-zhifubao"></i>
                            <span>支付宝</span>
                        </a>
                    </li>
                    //注册
                    <li class="extra-r">
                        <a href="../html/register.html">注册账号
                            <i class="icon icon-arrow-right-active"></i>
                        </a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</section>

<!-- 尾部导航 -->
<div class="footer-nav">
    <a href="/">首页</a> <b>|</b> <a href="/profile/about.htm" target="_blank">关于我们</a> <b>|</b> <a
        href="/profile/media.html" target="_blank">媒体报道</a> <b>|</b> <a href="/profile/contact.htm"
                                                                        target="_blank">联系方式</a> <b>|</b> <a
        href="/qiyetuangou/" target="_blank">企业团购</a> <b>|</b><a href="/liansuo/" target="_blank">花店入驻</a><b>|</b> <a
        href="/profile/links.htm" target="_blank">友情链接</a> <b>|</b> <a href="/member/payment/balancefill"
                                                                       target="_blank">在线补款</a> <b>|</b> <a
        class="last-child" href="/profile/why_choose_us.htm" target="_blank">为什么选择中国鲜花礼品网</a>
</div>
<!-- 尾部导航 End -->
<!-- 通用尾部 -->
<footer>
    <div class="auth">
        <!-- <span style="margin-right:8px;">
            <script src="http://kxlogo.knet.cn/seallogo.dll?sn=e15041744030058395oqbo000000&amp;size=4"></script>
        </span> -->


        <img src="../images/slogan.png" height="50" width="212"/>
        <a href="/profile/about.htm" target="_blank">
            <img src="../images/100.jpg" height="49" width="150">
        </a>
        <a href="/profile/ICP.htm" rel="nofollow" target="_blank">
            <img src="../images/bico1.jpg" alt="ICP" height="46" width="35">
        </a>
        <a href="https://szcert.ebs.org.cn/55f867a5-2c2e-4bc0-823b-5f4647c23d86">
            <img src="../images/govIcon.gif" style="width: 40px;height: 40px">
        </a>
    </div>
    <p>
        <a href="/profile/ChinaFlowerAssociation.htm" rel="nofollow" target="_blank" title="中国花卉协会会员">中国花卉协会会员</a>
        <a href="/profile/chinaECA.htm" rel="nofollow" target="_blank">中国电子商务协会会员</a>
        ICP经营许可证：
        <a>粤B2-20050744</a>
        <b>|</b>
        <a href="http://beian.miit.gov.cn" rel="nofollow" target="_blank">粤ICP备09171662号</a>
        <span lass="ico beian"></span>粤公网安备44030502000373号 Copyright © 2005-2020</p>
    <p><a href="/">www.hua.com</a><span> 深圳市百易信息技术有限公司</span></p>
</footer>
<!-- 通用尾部 End -->
<!-- 弹出窗口-->

<!-- 弹出窗口end-->
<script type="text/javascript">
    function IEVersion() {
        try {
            var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
            var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; //判断是否IE<11浏览器
            var isEdge = userAgent.indexOf("Edge") > -1 && !isIE; //判断是否IE的Edge浏览器
            var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1;
            if (isIE) {
                var reIE = new RegExp("MSIE (\\d+\\.\\d+);");
                reIE.test(userAgent);
                var fIEVersion = parseFloat(RegExp["$1"]);
                if (fIEVersion == 7) {
                    return 7;
                } else if (fIEVersion == 8) {
                    return 8;
                } else if (fIEVersion == 9) {
                    return 9;
                } else if (fIEVersion == 10) {
                    return 10;
                } else {
                    return 6;//IE版本<=7
                }
            } else if (isEdge) {
                return 'edge';//edge
            } else if (isIE11) {
                return 11; //IE11
            } else {
                return -1;//不是ie浏览器
            }
        } catch (e) {
            return -1;
        }
    }

    var bVersion = IEVersion();
</script>
<script type="text/javascript" charset="utf-8">
    $(function () {
        //增加绑定
        $("#dosubmit").on("click",Check_User_Login);
        // 表单切换
        var loginTabs = $('.login-tabs li');  // Tab
        var loginWx = $(".login-wx");   // 微信扫码登录
        var loginAccount = $('.login-account');     // 账号登录

        var loginForm = $('.login-form');   // Form
        var loginFormWx = $('.login-form-wx');  //  微信
        var loginFormBox = $(".login-form-box");    // 账号登录
        var loginFormPwd = $('.login-form-pwd');    // 账号密码
        var loginFormCode = $('.login-form-phone');     // 手机短信

        loginTabs.click(function () {
            loginTabs.removeClass('active');
            $(this).addClass('active');
            if ($(this).hasClass("login-account")) {
                loginForm.css({"display": "none"});
                loginFormBox.css({"display": "block"});
                window.clearInterval(interval1);
            } else if ($(this).hasClass("login-wx")) {
                loginForm.css({"display": "none"});
                loginFormWx.css({"display": "block"});
                interval1 = window.setInterval(intervalFunc1, 5000);
            }
        });

        // cookie无记录，根据显示的表单高亮对应Tab
        if (loginFormWx.css("display") != "none") {
            loginTabs.removeClass('active');
            loginWx.addClass("active");
        } else if (loginFormBox.css("display") != "none") {
            loginTabs.removeClass('active');
            loginAccount.addClass("active");
        }

        // 账号登录切换登录方式
        var loginToggle = $(".login-form-box-toggle>a");
        var toggleOpt = $(".toggle-opt");   // 短信验证码登录
        var toggleApt = $(".toggle-apt");   // 账号密码登录
        loginToggle.click(function () {
            if (loginFormCode.css("display") == "block") {       // 短信验证码登录
                loginFormCode.hide();
                loginFormPwd.show();
                toggleApt.hide();
                toggleOpt.show();
            } else if (loginFormPwd.css("display") == "block") {        // 账号密码登录
                loginFormPwd.hide();
                loginFormCode.show();
                toggleOpt.hide();
                toggleApt.show();
            }
        })

        // 微信小提示
        $(".mini-icon.icon-question").hover(function (e) {
            e.preventDefault();
            $(".pop-tips").fadeIn(200);
        }, function () {
            $(".pop-tips").fadeOut(100);
        })
    });
    // 回车键
    document.onkeydown = function (event) {
        var e = event || window.event || arguments.callee.caller.arguments[0];
        if (e && e.keyCode == 13) {
            // 账号密码登录表单
            var isUsernameFocus = $("#UserName").is(":focus");
            var isPasswordFocus = $("#PassWord").is(":focus");
            var isValidcodeFocus = $("#ValidCode").is(":focus");
            // 手机短信登录表单
            //var isUserphoneFocus = $("#UserPhone").is(":focus");
            var isphoneSmsCodeFocus = $("#phoneSmsCode").is(":focus");
            // Form:账号密码登录判断
            if (isUsernameFocus) {
                $("#PassWord").focus();
                return false;
            } else if (isPasswordFocus) {
                if ($("#verifyBox1").css("display") != "none") {
                    $("#ValidCode").focus();
                    return false;
                } else {
                    Check_User_Login();
                }
            } else if (isValidcodeFocus) {
                Check_User_Login();
            }
            // Form:手机短信登录判断
            if (isphoneSmsCodeFocus) {
                CheckPhoneLogin();
            }
        }
    };

    // 微信扫码登录
    $(function () {
        if ($(".login-wx").hasClass("active")) {
            interval1 = window.setInterval(intervalFunc1, 5000);
        } else {
            window.clearInterval(interval1);
        }
    });
    var counter1 = 600;
    var interval1;

    function intervalFunc1() {
        if (counter1 > 0) {
            counter1 -= 1;
            AjaxWxLogin();
        } else {
            window.clearInterval(interval1);
        }
    }

    function AjaxWxLogin() {
        var pid = "4d3a85f447de4b949af8ffe058d407ba";
        var sj = "2020-11-21";
        var sign = "dfd3a3f00f086b9d";
        $.ajax({
            type: "POST",
            url: "/Passport/Login/WXLogin1",
            data: {pid: pid, sj: sj, sign: sign},
            timeout: 5000,
            dataType: 'json',
            error: function (XMLHttpRequest, textStatus, errorThrown) {
            },
            success: function (data) {
                var retStatus = data.Status;
                if (retStatus == "0") {
                    if (data.DataStatus === 0) {
                        window.location.href = data.Datas.ReturnUrl;
                    } else if (data.DataStatus === 1500) {
                        window.location.href = data.Datas.ReturnUrl;
                    }

                }
            }
        });
    }

    // 账号密码登录
    function Check_User_Login() {
        //解除按钮事件绑定
        $("#dosubmit").unbind("click");
        try {
            HideTips();

            // 账号(邮箱或手机)
            if (!Check_Account("UserName", ".account-box")) {
                RefreshImage('imgCaptcha1');
                return false;
            }

            //手机号验证是否注册
            verifyPhone($("#UserName").val(),function (res) {
                if (res.code != 100){
                    ShowTips('手机号还未注册!','.account-box');
                    //刷新图形验证码
                    //RefreshImage('imgCaptcha1');
                    return false;
                }
            });

            // 密码
            if (!Check_Password("PassWord", ".pwd-box")) {
                RefreshImage('imgCaptcha1');
                return false;
            }

            var username = $("#UserName").val().trim();
            var pwd = $("#PassWord").val().trim();
            //var code = Check_Code("ValidCode", ".verify-box1");

            //账号密码登录
            /*$.ajax({
                type: "POST",
                url: "/Passport/Login/MobileLoginV1",
                data: {
                    userName: username,
                    password: pwd,
                    remember: false,
                    action: "login",
                    mobile: "",
                    smsValidCode: "",
                    picValidCode: code
                },
                async: false,
                success: function (res) {
                    //成功
                    layer.msg(3);
                    var data = res.Datas;
                    var failCount = data.LoginFailCount;
                    if (failCount > 3) {
                        //$("#verifyBox1").show();
                        showImgValidCode("verifyBox1");
                        RefreshImage('imgCaptcha1');
                    }
                    var class1 = ".pwd-box";
                    if (res.Status == "0" && res.DataStatus == 0) {
                        window.location.href = data.RedirectUrl;
                    } else if (res.DataStatus == 1012) {//图片验证码
                        class1 = ".verify-box1";
                    } else if (res.DataStatus == 1033) {//账号格式不正确
                        class1 = ".account-box";
                    } else if (res.DataStatus == 1007) {//账号不存在，或者密码不正确
                        class1 = ".pwd-box";
                    }
                    //弹出提示的位置
                    if (res.DataStatus != 0) {
                        ShowTips(res.ErrMsg || data.Message, class1);
                    }
                }
            });*/
            let json = {"phone":username,"password":pwd};
            //手机号密码登录
            phonePwdLogin(json,operation);
        }finally {
            //发送 ajax 延迟绑定
            window.setTimeout(function () {
                //增加绑定
                $("#dosubmit").on("click",Check_User_Login);
            },1000);
        };
    }

    //********************手机验证码登录逻辑begin********************
    var interval = null
    var counter = 0;
    //图形验证码默认验证码失败
    var showImgValidCode1 = false;
    //验证锁 默认失败
    var geetestLock = false;
    $(function () {
        // 发送短信验证码(获取验证码按钮点击事件)
        $("#getcodeBtn").click(function () {
            //清空提示文本
            HideTips();
            //验证手机号是否合法
            if (!Check_Phone("UserPhone", ".tel-box")) return false;
            //验证成功获取手机号(去空格)
            let phone = $("#UserPhone").val().trim();

            //手机号验证是否注册
            verifyPhone(phone,function (res) {
                if (res.code != 100){
                    ShowTips('手机号还未注册!','.tel-box');
                    //刷新图形验证码
                    //RefreshImage('imgCaptcha1');
                    return false;
                }
            });

            //后端所需数据
            var data = {
                //手机号
                phone: phone
            };
            //发送短信
            sendSms(data);
        });
    });

    //发送短信
    /*function sendSms(data) {
        //发送短信验证码
        $.ajax({
            type: "post",
            url: "/SmsAuthenCode/SendV3",
            data: data,
            async: false,
            success: function (res) {
                var data = res.Datas;
                var class1 = ".code-box";
                if (res.Status == "0" && res.DataStatus == 0) {     // 发送成功
                    ShowTips("<span style='color:#232628'>验证码已发送请查收</span>", ".code-box");
                    counter = 0;
                    $("#getcodeBtn").hide();
                    $("#regetcode").html("90");
                    $("#prompt_info").show();
                    $("#phoneSmsCode").focus();
                    interval = window.setInterval(intervalFunc, 1000);
                } else if (res.DataStatus == 1026) {      // 需要图片验证码
                    $("#verifyBox2").show();
                    $("#phonePicCode").focus();
                    class1 = ".verify-box2";
                } else if (res.DataStatus == 1002) {     // 手机号格式不正确
                    $("#UserPhone").focus();
                    class1 = ".tel-box";
                } else if (res.DataStatus == 1012) {     // 图片验证码不正确
                    $("#verifyBox2").show();
                    RefreshImage2('imgCaptcha2');
                    $("#phonePicCode").focus();
                    class1 = ".verify-box2";
                } else if (res.DataStatus == 1003) {    // 短信验证码发送过于频繁
                    class1 = ".code-box";
                }
                if (res.DataStatus != 0) {
                    ShowTips(res.ErrMsg || data.Message, class1);
                }
            }
        });
    }*/

    // 短信验证码倒计时
    function intervalFunc() {
        if (counter > 90) {
            counter = 0;
            $("#getcodeBtn").show();
            $("#prompt_info").hide();
            window.clearInterval(interval);
        } else {
            $("#regetcode").html((90 - counter).toString());
        }
        counter = counter + 1;
    }

    // 手机验证码登录
    function CheckPhoneLogin() {
        //解除按钮事件绑定
        $("#dosubmit").unbind("click");
        try {
            HideTips();
            if (!Check_Phone("UserPhone", ".tel-box")) return false;    // 手机
            if (!Check_SmsCode("phoneSmsCode", ".code-box")) return false;      // 短信验证码
            let phone = $("#UserPhone").val().trim();
            let code = $("#phoneSmsCode").val().trim();
            var data = {
                phone:phone,
                verification_code:code
            };
            //短信验证码登录
            smsLogin(data);
            //var imgCode = Check_Code("phonePicCode", ".verify-box2");
            /*$.ajax({
                type: "post",
                url: "/Passport/Login/MobileLoginV1",
                data: {
                    userName: phone,
                    password: "",
                    remember: false,
                    action: "SmsValidCodeLogin",
                    mobile: phone,
                    smsValidCode: code,
                    picValidCode: imgCode
                },
                datatype: 'json',
                async: false,
                success: function (res) {
                    var data = res.Datas;
                    var class1 = ".pwd-box";
                    if (res.Status == "0" && res.DataStatus == 0) {
                        window.location.href = data.RedirectUrl;
                    } else if (res.DataStatus == 1023) {
                        class1 = ".tel-box";
                        $("#UserPhone").focus();
                    } else if (res.DataStatus == 1002) {
                        class1 = ".tel-box";
                        $("#UserPhone").focus();
                    } else if (res.DataStatus == 1005) {
                        class1 = ".code-box";
                        $("#phoneSmsCode").focus();
                    }
                    //弹出提示的位置
                    if (res.DataStatus != 0) {
                        ShowTips(res.ErrMsg || data.Message, class1);
                    }
                }
            });*/
        }finally {
            //发送 ajax 延迟绑定
            window.setTimeout(function () {
                //增加绑定
                $("#dosubmit").on("click",Check_User_Login);
            },1000);
        }
    }

    //********************手机验证码登录逻辑 end********************

</script>
<script type="text/javascript">
    var userId = 0;

    function reqUrlParam(paras) {
        var url = location.href;
        var paraString = url.substring(url.indexOf("?") + 1, url.length).split("&");
        var paraObj = {}
        for (i = 0; j = paraString[i]; i++) {
            paraObj[j.substring(0, j.indexOf("=")).toLowerCase()] = j.substring(j.indexOf("=") + 1, j.length);
        }
        var returnValue = paraObj[paras.toLowerCase()];
        if (typeof (returnValue) == "undefined") {
            return "";
        } else {
            return returnValue;
        }
    }

    function setLocalStoreHua(k, v) {
        try {
            if (localStorage != null) {
                localStorage.setItem(k, v);
            }
        } catch (ex) {
        }
    }

    function getLocalStoreHua(k) {
        try {
            if (localStorage != null) {
                var v1 = localStorage.getItem(k);
                localStorage.removeItem(k);
                return v1;
            }
        } catch (ex) {
        }
        return "";
    }

    var lsPerfKey = "home/GetProductListPrice";

    function getProductPrice() {
        var dataPps = "";
        $("span[data-pp]").each(function (index, data) {
            dataPps = dataPps + $(this).attr("data-pp") + ",";
        })
        if (dataPps.length > 0) {
            var perf1 = getLocalStoreHua(lsPerfKey);
            var dts = new Date();
            $.ajax({
                type: "POST", url: "/home/GetProductListPrice",
                data: {itemcodes: dataPps, perf: perf1},
                timeout: 60000, dataType: 'json',
                success: function (res) {
                    if (res.DataStatus == 200 && res.Status == '0') {
                        if (res.Datas.ProductPrices.length == 0) {
                            return false;
                        }
                        for (var i = 0, len = res.Datas.ProductPrices.length; i < len; i++) {
                            var temp = res.Datas.ProductPrices[i];
                            $("span[data-pp='" + temp.ItemCode + "']").text(temp.Price);
                        }
                    } else {
                    }
                },
                complete: function (res) {
                    var dte = new Date();
                    var useMs = dte.getTime() - dts.getTime();
                    //var resTxt = "v0,"+res.readyState + "," + res.status + "," + res.statusText;
                    var resTxt = "v0," + res.status + "," + dts.getTime() + "," + useMs;
                    setLocalStoreHua(lsPerfKey, resTxt);
                    //console.log("AjaxReq性能", resTxt);
                }
            });
        }
    }

    function setCurUrlClass() {
        // css : class = "color_tj"
        var pathname1 = window.location.pathname;
        $("a[href='" + pathname1 + "'").addClass("color_tj");
    }

    getProductPrice();

    function addHuaPid() {
        try {
            var path = encodeURIComponent(window.location.pathname);
            $("a[data-link]").each(function (index, data) {
                if ($(this).attr("href").indexOf("huaPid=") == -1) {
                    var href = $(this).attr("href") + "?huaPid=" + path + "-" + $(this).attr("data-link");
                    $(this).attr("href", href);
                }
            })
        } catch (e) {
            console.log(e);
        }
    }

    addHuaPid();

    $(function () {
        $(".menu-dropdown").hover(function () {
            $(this).addClass("open");
        }, function () {
            $(this).removeClass("open")
        })

        $(".header-chat,#kefu,#kefu1").click(function (e) {
            e.preventDefault();
            //$("#MEIQIA-BTN").click();
            //_MEIQIA('showPanel');
            openChatWindow();
        });

        if ($("#pjCount").length > 0) {
            $.get("/productpj/GetPJCount", function (data) {
                $("#pjCount").text(data);
            });
        }
    });
</script>
<!--Hua.com统计-->
<script type="text/javascript">
    function getParameters(paramName) {
        var returnValue = "";
        var kv = location.search.slice(1).split("&");
        for (var i = 0; i < kv.length; i++) {
            var index = kv[i].indexOf("=");
            if (index == -1) {
                continue;
            }
            var groupParam = kv[i].split("=")
            if (groupParam[0] == paramName) {
                if (returnValue.length > 0) {
                    returnValue = returnValue + "|" + groupParam[1];
                } else {
                    returnValue = groupParam[1];
                }
            }
        }
        return returnValue;
    }

    (function () {
        var locationUrl = location.href;
        var refererUrl = document.referrer;
        if (locationUrl.length > 300) {
            locationUrl = locationUrl.substring(0, 300);
        }
        if (refererUrl.length > 200) {
            refererUrl = refererUrl.substring(0, 200);
        }
    })();
</script>
<!-- Google Tag Manager -->
<script type="text/javascript">
    try {
        if (bVersion != 8) {
            (function (w, d, s, l, i) {
                w[l] = w[l] || [];
                w[l].push({
                    'gtm.start':
                        new Date().getTime(), event: 'gtm.js'
                });
                var f = d.getElementsByTagName(s)[0],
                    j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : '';
                j.async = true;
                j.src =
                    '../js/gtm.js?id=' + i + dl;
                f.parentNode.insertBefore(j, f);
            })(window, document, 'script', 'dataLayer', 'GTM-KS4PTHC');
        }
    } catch (e) {
    }
</script>
<!-- End Google Tag Manager -->
<script type='text/javascript'>
    try {
        if (bVersion != 8 && bVersion != 9) {
            (function (m, ei, q, i, a, j, s) {
                m[i] = m[i] || function () {
                    (m[i].a = m[i].a || []).push(arguments)
                };
                j = ei.createElement(q),
                    s = ei.getElementsByTagName(q)[0];
                j.async = true;
                j.charset = 'UTF-8';
                j.src = '../js/meiqia.js';
                s.parentNode.insertBefore(j, s);
            })(window, document, 'script', '_MEIQIA');
            _MEIQIA('entId', 111117);
        }
    } catch (e) {
    }

    function LayerOpen(title, url, wdith, height) {
        layer.open({
            type: 2,
            title: title,
            shadeClose: true,
            shade: 0,
            offset: 'rb', //右下角弹出
            area: [wdith + 'px', height + 'px'],
            content: url //iframe的url
        });
    }

    function openChatWindow() {
        if (bVersion == 9) {
            LayerOpen("在线客服", "https://temp-chat.mstatik.com/widget/standalone.html?eid=111117", 500, 600);
        } else if (bVersion == 8) {
            LayerOpen("在线客服", "/home/weixinkefu", 240, 300);
        } else {
            _MEIQIA('showPanel');
        }
    }
</script>
<script type="text/javascript">

    $('#bindModal').on('hidden.bs.modal', function () {
        $("#attBindPage").attr("src", "");
    });
    //绑定窗口操作结束
    var appAuthorizedType = -1;
    if (appAuthorizedType && appAuthorizedType > 0) {
        DoBind();
    }

    function DoBind() {
        try {
            $('#consigneeModal').modal('hide');
            $('#loginModal').modal('hide');
            $('#bindModal').modal('show');
        } catch (err) {
        }
    }

</script>
</body>
</html>